package com.wiloon.java8x.basic.encode;

import org.apache.commons.codec.binary.Hex;

public class HexChar {
    public static void main(String[] args) {
        byte[] b = new byte[1];
        b[0] = (byte) 'a';
        String hex = Hex.encodeHexString(b);
        System.out.println("hex:" + hex);
        System.out.println("int:" + new Integer(b[0]));
        System.out.println(Integer.toBinaryString(new Integer(b[0])));
    }
}
